package com.zengqingfa.designpattern.structure.proxy.statics;

/**
 *
 * @fileName: RealSubjectProxy
 * @author: zengqf3
 * @date: 2021-4-22 8:49
 * @description:
 */
public class RealSubjectProxy implements Subject {

    Subject realSubject;

    public RealSubjectProxy(Subject realSubject) {
        this.realSubject = realSubject;
    }

    @Override
    public void method() {
        //调用之前一些操作
        System.out.println("代理对象before....");
        realSubject.method();
        //调用之后一些操作
        System.out.println("代理对象after....");
    }
}
